package vashion.azeroth.api.controller.tran;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import vashion.azeroth.core.manager.business.tran.BusinessAccountManager;
import vashion.azeroth.core.personal.tran.pojo.PersonalVAccount;
import vashion.azeroth.core.result.ApiResult;
import vashion.azeroth.core.service.tran.PersonalVAccountService;

@Controller
@RequestMapping("tran")
public class QueryVAccountController {

	@Autowired
	private PersonalVAccountService<PersonalVAccount> vaccountService;
	
	BusinessAccountManager businessAccountManager;

	@RequestMapping("/queryVAccount")
	@ResponseBody
	public ApiResult<PersonalVAccount> queryVAccount(Long memberId) {

		return vaccountService.queryVAccount(memberId);
	}
	
	//---------------------------------------------------------------------
	//用于CRM后台查询使用
	//---------------------------------------------------------------------
	

	@RequestMapping("/queryVAccountBy")
	@ResponseBody
	public ApiResult<List<PersonalVAccount>> queryVAccountBy(
			PersonalVAccount personalVAccount) {

		return vaccountService.queryVAccountBy(personalVAccount);

	}

}
